package org.example.springiocdemo.Controller;

import org.example.springiocdemo.Service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class UserController2 {
    private UserService userService;

    @Autowired
    public UserController2(UserService userService){
        this.userService = userService;
    }
    public void hello(){
        System.out.println("Hello UserController2");
        userService.hello();
    }
}
